﻿@model JaxDug.Areas.CodeCamp.Models.Attendee

@{
    ViewBag.Title = "Registration";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Attendee Registration</h2>

@section Bottom {

    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Attendee</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ShirtSize)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(m => m.ShirtSize, new List<SelectListItem>() { 
                    new SelectListItem() { Text = "Small", Value = "Small" },
                    new SelectListItem() { Text = "Medium", Value = "Medium" },
                    new SelectListItem() { Text = "Large", Value = "Large" },
                    new SelectListItem() { Text = "XL", Value = "XL" },
                    new SelectListItem() { Text = "XXL", Value = "XXL" },
                    new SelectListItem() { Text = "XXXL", Value = "XXXL" }
           })
                @Html.ValidationMessageFor(model => model.ShirtSize)
        </div>
        

        

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to Attendee", "Index")
</div>
